/**
 * 
 */
package org.vsg.stock.basic.domain;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;

import org.hibernate.annotations.Proxy;

/**
 * @author vison
 *
 */
@Entity
@Proxy(lazy = true)
@DiscriminatorValue("R")
public class RealStockInfo extends StockInfo {
	
	@Column(name="CAPITAL")	
	private Double capital;

	@Column(name="CAPITAL_A")	
	private Double aCapital;
	
    @ManyToMany(
            targetEntity=org.vsg.stock.basic.domain.StockCategory.class,
            cascade={CascadeType.ALL},
            fetch = javax.persistence.FetchType.EAGER
    )
     @JoinTable(
            name="STOCK_CATEGORY_MAP",
            joinColumns=@JoinColumn(name="STOCK_CODE"),
            inverseJoinColumns=@JoinColumn(name="ID_CATEGORY")
    )
	private List<StockCategory> assoStockCategory;
	


	public Double getCapital() {
		return capital;
	}

	public void setCapital(Double capital) {
		this.capital = capital;
	}

	public Double getACapital() {
		return aCapital;
	}

	public void setACapital(Double aCapital) {
		this.aCapital = aCapital;
	}

	public List<StockCategory> getAssoStockCategory() {
		return assoStockCategory;
	}

	public void setAssoStockCategory(List<StockCategory> assoStockCategory) {
		this.assoStockCategory = assoStockCategory;
	}

	

}
